package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CleaningConfigMapper;
import com.ruoyi.system.domain.CleaningConfig;
import com.ruoyi.system.service.ICleaningConfigService;

/**
 * 清洗配置表管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-22
 */
@Service
public class CleaningConfigServiceImpl implements ICleaningConfigService 
{
    @Autowired
    private CleaningConfigMapper cleaningConfigMapper;

    /**
     * 查询清洗配置表管理
     * 
     * @param cleaningConfigId 清洗配置表管理主键
     * @return 清洗配置表管理
     */
    @Override
    public CleaningConfig selectCleaningConfigByCleaningConfigId(Long cleaningConfigId)
    {
        return cleaningConfigMapper.selectCleaningConfigByCleaningConfigId(cleaningConfigId);
    }

    /**
     * 查询清洗配置表管理列表
     * 
     * @param cleaningConfig 清洗配置表管理
     * @return 清洗配置表管理
     */
    @Override
    public List<CleaningConfig> selectCleaningConfigList(CleaningConfig cleaningConfig)
    {
        return cleaningConfigMapper.selectCleaningConfigList(cleaningConfig);
    }

    /**
     * 新增清洗配置表管理
     * 
     * @param cleaningConfig 清洗配置表管理
     * @return 结果
     */
    @Override
    public int insertCleaningConfig(CleaningConfig cleaningConfig)
    {
        cleaningConfig.setCreateTime(DateUtils.getNowDate());
        return cleaningConfigMapper.insertCleaningConfig(cleaningConfig);
    }

    /**
     * 修改清洗配置表管理
     * 
     * @param cleaningConfig 清洗配置表管理
     * @return 结果
     */
    @Override
    public int updateCleaningConfig(CleaningConfig cleaningConfig)
    {
        cleaningConfig.setUpdateTime(DateUtils.getNowDate());
        return cleaningConfigMapper.updateCleaningConfig(cleaningConfig);
    }

    /**
     * 批量删除清洗配置表管理
     * 
     * @param cleaningConfigIds 需要删除的清洗配置表管理主键
     * @return 结果
     */
    @Override
    public int deleteCleaningConfigByCleaningConfigIds(Long[] cleaningConfigIds)
    {
        return cleaningConfigMapper.deleteCleaningConfigByCleaningConfigIds(cleaningConfigIds);
    }

    /**
     * 删除清洗配置表管理信息
     * 
     * @param cleaningConfigId 清洗配置表管理主键
     * @return 结果
     */
    @Override
    public int deleteCleaningConfigByCleaningConfigId(Long cleaningConfigId)
    {
        return cleaningConfigMapper.deleteCleaningConfigByCleaningConfigId(cleaningConfigId);
    }
}
